fix: make non-essential env vars optional#71
Open
rasswanth-lyzr wants to merge 1 commit into
Open
Conversation
Converts 7 placeholder-valued env vars from hard-required to optional so the server starts cleanly without them: - SERVER_LOGFIRE_WRITE_TOKEN / SERVER_LOGFIRE_READ_TOKEN (observability) - SERVER_STRIPE_SECRET_KEY / SERVER_STRIPE_WEBHOOK_SIGNING_SECRET (billing) - SERVER_ANTHROPIC_API_KEY (frontend QA agent) - SERVER_VECTOR_DB_FULL_URL (docs search) - SERVER_APPLICATION_LOAD_BALANCER_DNS (proxy headers middleware) Each call site now guards with an early return (empty list / None / 503) when the corresponding config value is None. SEEDING_LAMBDA_URL, SKIP_AUTO_SEED, DB_SECRET_NAME, and AWS_REGION_NAME are confirmed unused on main and can be dropped from deployment env configs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
os.getenvreturningNone) inconfig.pyWRITE_TOKEN/READ_TOKEN): analytics routes return empty lists; logfire instrumentation is skippedSECRET_KEY/WEBHOOK_SIGNING_SECRET): stripe init is skipped; webhook endpoint returns 503ANTHROPIC_API_KEY): frontend QA agent returnsNoneearlyVECTOR_DB_FULL_URL): docs search endpoint returns 503APPLICATION_LOAD_BALANCER_DNS):ProxyHeadersMiddlewareis skipped entirelySEEDING_LAMBDA_URLandSKIP_AUTO_SEEDare unused across main, prod, enterprise/prod, and onprem/dev — safe to remove from deployment configsTest plan
/v1/analytics/*) return[]whenLOGFIRE_READ_TOKENis absentPOST /v1/billing/webhookreturns 503 whenSTRIPE_WEBHOOK_SIGNING_SECRETis absentGET /v1/docsreturns 503 whenVECTOR_DB_FULL_URLis absent🤖 Generated with Claude Code